<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>修改密码 - 个人中心</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <link th:href="@{/http://netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/userCenter.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/modules.css?v=2016120801}" rel="stylesheet" type="text/css"/>
    <script th:src="@{/js/jquery-3.5.1.js}" type="text/javascript"></script>
    <script th:src="@{/layer/layer.js}" type="text/javascript"></script>
    <script th:src="@{/js/jquery.validate.min.js}"></script>
    <style type="text/css">.withdrawal-password .withdrawal-password-form {
        overflow: hidden
    }

    .withdrawal-password .withdrawal-password-form .form-group {
        margin: 15px 0
    }

    .withdrawal-password .withdrawal-password-form .withdrawal-password-amount-input {
        padding-left: 0
    }

    .withdrawal-password .withdrawal-password-form .withdrawal-password-type {
        padding-bottom: 10px
    }

    .withdrawal-password .withdrawal-password-form .withdrawal-password-select select {
        display: inline;
        width: 134px;
        margin-right: 15px
    }

    .withdrawal-password .withdrawal-password-form .withdrawal-password-container {
        padding: 10px 0
    }

    .withdrawal-password .withdrawal-password-form .withdrawal-password-container button {
        padding: 8px 20px
    }

    .withdrawal-password .withdrawal-password-form .withdrawal-password-container .btn-save {
        padding: 8px 40px
    }</style>
    <script>
        $(function () {
            $("#pwdform").validate({
                rules: {
                    newPassword: {
                        required: true,
                        rangelength: [5, 15]
                    },
                    passwordRepeat: {
                        required: true,
                        rangelength: [5, 15],
                        equalTo:"#newPassword"
                    },
                },
                messages: {
                    newPassword: {
                        required: "密码不能为空",
                        rangelength: $.validator.format("请输入长度在 {0} 到 {1} 之间的字符串"),
                    },
                    passwordRepeat: {
                        required: "密码不能为空",
                        rangelength: $.validator.format("请输入长度在 {0} 到 {1} 之间的字符串"),
                        equalTo: "密码不一致"
                    },
                },
            });
        })
    </script>
</head>
<body>
<div class="loading">
    <div class="loading-icon">
        <img th:src="@{/images/logo.png}"/>
        <div class="typing_loader"></div>
    </div>
</div>
<div id="app">
    <div class="app-container" data-reactid=".0">
        <div class="layout" data-reactid=".0.0">
            <div class="hContent headerInfo">
                <header th:replace="~{commons::#top}"/>
                <div class="bottom_bar" data-reactid=".0.0.0.1">
                    <span class="before" data-reactid=".0.0.0.1.0"></span>
                    <span class="after" data-reactid=".0.0.0.1.1"></span>
                </div>
            </div>
            <div class="icontainer clearfix" data-reactid=".0.0.1">
                <div class="left-menu">
                    <dl>
                        <dt>
                            <a th:href="@{/order/list}"> <i class="icon-my-order"></i> 我的订单 </a>
                        </dt>
                    </dl>
                    <dl>
                        <dt>
                            <div>
                                <i class="icon-my-account"></i> 我的账户
                            </div>
                        </dt>
                        <dd>
                            <a th:href="@{/user/userAccount}"> 账户余额 </a>
                        </dd>
                        <dd>
                            <a th:href="@{/user/userPay}"> 充值 </a>
                        </dd>
                        <dd>
                            <a th:href="@{/user/discount}"> 优惠券 </a>
                        </dd>
                        <dd>
                            <a th:href="@{/user/usualInfo}"> 常用信息 </a>
                        </dd>
                        <dd>
                            <a th:href="@{/user/initcost}"> 消费统计 </a>
                        </dd>
                    </dl>

                    <dl>
                        <dt>
                            <div>
                                <i class="icon-settings"></i> 设置
                            </div>
                        </dt>
                        <dd>
                            <a th:href="@{/user/updatepwd}"> 修改密码 </a>
                        </dd>
                    </dl>

                </div>
                <div class="right-container" data-reactid=".0.0.1.1">
                    <div class="withdrawal-password" data-reactid=".0.0.1.1.0">
                        <div class="withdrawal-password-title ui-text-bold ui-ft-16" data-reactid=".0.0.1.1.0.0">
                            修改密码
                        </div>
                        <div class="ui-mt-15 ui-line-bottom" data-reactid=".0.0.1.1.0.1"></div>
                        <div class="withdrawal-password-form ui-mt-15" data-reactid=".0.0.1.1.0.2">
                            <form class="form-horizontal" method="post" action="/user/updatepwd" id="pwdform">
                                新密码：&nbsp&nbsp&nbsp&nbsp<input class="form-control icon-lock" placeholder="输入您的密码"
                                                               id="newPassword" name="newPassword" value=""
                                                               data-reactid=".0.0.1.1.0.2.0.0.1.0.0.0"
                                                               type="password"/>
                                <br/>
                                <br/>
                                确认密码：<input class="form-control icon-confirm" placeholder="再次输入您的密码"
                                            name="passwordRepeat" value=""
                                            data-reactid=".0.0.1.1.0.2.0.1.1.0.0.0" type="password"/>
                                <br/>
                                <br/>
                                <button type="submit">修改密码</button> <span th:text="${session.msg}"></span>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <footer th:replace="~{commons::#footer}"/>
        </div>
    </div>
</div>
</body>
</html>